CentOS 6
Sponsored Link

Gitolite - Add New Repository
2013/03/06
 
Add New Repository in Gitolite.
[1] Work with Gitolite admin
-sh-4.1$
vi /var/lib/gitolite/gitolite-admin/conf/gitolite.conf
repo    gitolite-admin
        RW+     =   gitadmin

repo    testing
        RW+     =   @all

# add public-repo

repo    public-repo
        RW+     =   @all

-sh-4.1$
cd gitolite-admin

-sh-4.1$
git commit -a -m "Add public-repo repository"

-sh-4.1$
git push

Counting objects: 7, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (3/3), done.
Writing objects: 100% (4/4), 403 bytes, done.
Total 4 (delta 0), reused 0 (delta 0)
remote: creating public-repo...
remote: Initialized empty Git repository in /var/lib/gitolite/repositories/public-repo.git/
[2] Make sure a user can clone the repository added.
# show the list of repositories he can access

[cent@www ~]$
ssh GitServer

PTY allocation request failed on channel 0
hello id_cent, this is gitolite 2.3.1-1.el6 running on git 1.7.1
the gitolite config gives you the following access:
    @R_ @W_     public-repo
    @R_ @W_     testing
Connection to 10.0.0.31 closed.

[cent@www ~]$
git clone ssh://GitServer/public-repo

Initialized empty Git repository in /home/cent/public-repo/.git/
warning: You appear to have cloned an empty repository.
[cent@www ~]$
total 8
drwxr-xr-x 3 cent cent 4096 Mar  6 14:45 public-repo
drwxr-xr-x 3 cent cent 4096 Mar  6 14:03 testing
 
Tweet